define(['jquery'], function ($) {
	var Controller={
		jishu: function(){
			$('.onclick').on('click','.my-btn-add',function(){
				var _html = '<tr class="technology_language">'+$(this).parent().parent().parent('tr').html()+'</tr>';
				$(this).parents('.insert-tr').append(_html);
			});
			$('.onclick').on('click','.my-btn-del',function(){
				if ($(this).parents('.insert-tr').find('tr').length <= 2) {
					layer.alert('要留一个哟~~');
					return false;
				}
				$(this).parent().parent().parent('tr').remove();
			});
            $('.onclick').on('click','.btn-add',function(){
            	var select_box=$(this).parents('.select_box');
                var _html = '<tr class="select_item"' +
					'>'+$(this).parents('.select_item').html()+'</tr>';
                select_box.append(_html);
                select_box.find('.select_item:last').find("input[name=id]").val('');
            });
            $('.onclick').on('click','.btn-del',function(){
                if ($(this).parents('.select_box').find('tr').length <= 2) {
                    layer.alert('要留一个哟~~');
                    return false;
                }
                $(this).parents('.select_item').remove();
            });
		},
		yedit: function(){
			$('.my-upload').click(function(){
				layer.open({
					type: 2,
					title: '资源上传',
					area: ['80%', '80%'],
					fixed: false, //不固定
					maxmin: true,
					content: '../ziyuan/zedit'
				});
			});
		}
	};
    return Controller;
});